/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package air_hockey_v2.gui;

import air_hockey_v2.engine.Taco;
import java.awt.Graphics;
import java.awt.Image;
import java.net.URL;
import javax.swing.ImageIcon;

/**
 *
 * @author Matheus Cintra
 */
public class GuiTaco extends GuiItens{
    
    public GuiTaco(JogoPanel panel, Taco taco){
        super(panel,taco);
        
        String filename = taco.getFilename();
        URL url = GuiDisco.class.getResource(filename);
        imagem = (new ImageIcon(url)).getImage();
    }

    @Override
    public void draw(Graphics g) {
        g.drawImage(imagem, item.getX(),item.getY(), null);
    }

}
